<?php

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

class RefundLogs extends Model
{
    public $timestamps = true;

    protected $table = 'refund_logs';


    /**
     * 为数组 / JSON 序列化准备日期。
     *
     * @param \DateTimeInterface $date
     * @return string
     */
    protected function serializeDate(\DateTimeInterface $date)
    {
        return Carbon::instance($date)->toDateTimeString();
    }
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'user_id', 'admin_id','money','note','refund_sn','order_sn','transaction_sn','is_success','original'
    ];

    protected $casts = [ 'original' => 'json'];

}
